<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="bolao" />
  <g:set var="entityName" value="${message(code: 'cup.label', default: 'Cup')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <div class="body">
    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="list">
      <table class="table">
        <thead>
          <tr>
            <g:sortableColumn property="year" title="${message(code: 'cup.year.label', default: 'Year')}" />
            <g:sortableColumn property="venue" title="${message(code: 'cup.venue.label', default: 'Venue')}" />
        </tr>
        </thead>
        <tbody>
        <g:each in="${cups}" status="i" var="cup">
          <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
            <td><g:link action="show" id="${cup?.id}">${cup?.year?.toString()}</g:link></td>
            <td>${fieldValue(bean: cup, field: "venue")}</td>
          </tr>
        </g:each>
        </tbody>
      </table>
    </div>
    <div class="paginateButtons">
      <g:paginate total="${cupTotal}" />
    </div>
  </div>
</body>
</html>